package com.scs.application.core.pdf.enums;

import lombok.Getter;

/**
 * @description:
 */
public enum TextShowType {

    PLAIN("plain", "明文"),
    BARCODE("barcode", "条形码"),
    QRCODE("qrcode", "二维码");


    @Getter
    private String code;

    @Getter
    private String desc;

    TextShowType(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static TextShowType of(String code) {
        switch (code) {
            case "plain":
                return TextShowType.PLAIN;
            case "barcode":
                return TextShowType.BARCODE;
            case "qrcode":
                return TextShowType.QRCODE;
            default:
                return TextShowType.PLAIN;
        }
    }

}
